ScriptNPC
Display Methods These methods are related to the Settings available on the Display Tab of the Standard NPC Editor GUI Method Javadoc Link Examples Search getHomeX Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getHomeX Search Examples Returns the Home X Value of the NPC. getHomeY Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getHomeY Search Examples Returns the Home Y Value of the NPC. getHomeZ Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getHomeZ Search Examples Returns the Home Z Value of the NPC. getName Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getName Search Examples Returns the Name of the NPC getShowBossBar Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getShowBossBar Search Examples Returns whether the NPC is set to show the Boss Bar or not. getShowName Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getShowName Search Examples Returnrs whether the NPC is set to show the Name Label or not. getSize Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getSize Search Examples Returns the Size Value of the NPC. getTexture Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getTexture Search Examples Returns the Texture of the NPC. getTitle Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getTitle Search Examples Returns the Title of the NPC. getVisibleType Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getVisibleType Search Examples Returns the Visibility Type of the NPC. 0=Visible, 1=Invisible, 2=semi-visible setArmsScale Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setArmsScale Search Examples Sets the value of the Arm Scale of the NPC Model. setBodyScale Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setBodyScale Search Examples Sets the value of the Body Scale of the NPC Model. setHeadScale Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setHeadScale Search Examples Sets the value of the Head Scale of the NPC Model. setLegsScale Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setLegsScale Search Examples Sets the value of the Legs Scale of the NPC Model. setHome Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setHome Search Examples Sets the Home value of the NPC. setHomeX Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setHomeX Search Examples Sets the Home X value of the NPC. setHomeY Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setHomeY Search Examples Sets the Home Y value of the NPC. setHomeZ Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setHomeZ Search Examples Sets the Home Z value of the NPC. setName Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setName Search Examples sets the Name of the NPC. setRotation Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setRotation Search Examples sets the Name of the NPC. setShowBossBar Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setShowBossBar Search Examples Sets how the Boss Bar of the NPC should be shown. 0=Invisible, 1=Visible, 2 = Visible When Attacking setShowName Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setShowName Search Examples Sets whether the Name Label of the NPC should be shown or not. setSize Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setSize Search Examples Sets the Size Value of the NPC. Min=1, Max=? setTexture Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setTexture Search Examples Sets the Texture for the NPC. setTitle Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setTitle Search Examples Sets the Title of the PC setVisibleType Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setVisibleType Search Examples Sets the Visibilty Type of the NPC. 0=Visible, 1=Invisible, 2=semi-visible Stats Methods These methods are related to the Settings found on the Stats Tab of the Standard CustomNPC Editor GUI. Method Javadoc Link Examples Search getArrowResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getArrowResistance Search Examples Returns the Value of the Arrow Resistance for the NPC. getCombatRegen Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getCombatRegen Search Examples Returns the Health Regen Value used for the NPC while the NPC is in combat. getExplosionResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getExplosionResistance Search Examples Returns the Explosion Resistance Value for the NPC getHealthRegen Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getHealthRegen Search Examples Returns the Health Regen Value used for the NPC while the NPC is not in combat. getKnockbackResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getKnockbackResistance Search Examples Returns the Knockback Resistance value for the NPC. getMeleeResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getMeleeResistance Search Examples Returns the Melee Resistance value for the NPC. getMeleeSpeed Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getMeleeSpeed Search Examples Returns the Melee Speed value for the NPC. getMeleeStrength Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getMeleeStrength Search Examples Returns the Melee Strength value for the NPC. getRangedBurst Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getRangedBurst Search Examples Returns the Ranged Burst Count for the NPC. getRangedSpeed Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getRangedSpeed Search Examples Returns the Ranged Speed Value for the NPC. getRangedStrength Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getRangedStrength Search Examples Returns the Ranged Strength Value for the NPC. seExplosionResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.seExplosionResistance Search Examples Sets the Explosion Resistance for the NPC. This is not a typo. As at Version 1.8.0_alpha the method is missing the "t" in "set". setArrowResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setArrowResistance Search Examples Sets the value of the Arrow Resistance the NPC has. setCombatRegen Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setCombatRegen Search Examples Sets the Health regen Values used while the NPC is in Combat. setHealthRegen Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setHealthRegen Search Examples Sets the Health Regen value used when the NPC is not in Combat. setKnockbackResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setKnockbackResistance Search Examples Sets the amount of resistance the NPC has against Knockback Attacks. setMaxHealth Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setMaxHealth Search Examples Sets the Maximum Health Value for the NPC. setMeleeResistance Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setMeleeResistance Search Examples Sets the amount of resistance the NPC has against Melee Attacks. setMeleeSpeed Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setMeleeSpeed Search Examples Sets the Melee Speed for the NPC. setMeleeStrength Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setMeleeStrength Search Examples Sets the Melee Strength of the NPC. setRangedBurst Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setRangedBurst Search Examples Sets the Ranged Burst Count for the NPC. setRangedSpeed Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setRangedSpeed Search Examples Sets the Ranged Attack Speed for the NPC. setRangedStrength Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setRangedStrength Search Examples Sets the Ranged Attack Strength for the NPC. AI Methods These methods are related to the Settings available through the AI Tab of the Standard NPC Editor GUI. Method Javadoc Link Examples Search getReturnToHome Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getReturnToHome Search Examples Returns whether the NPC will Return to their Home Position or not. setAnimation Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setAnimation Search Examples Sets the Animation Type for the NPC. See: AnimationType setRetaliateType Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setRetaliateType Search Examples Sets the Type of Retalition the NPC will perform when attacked. 0:normal, 1:panic, 2:retreat, 3:nothing setReturnToHome Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setReturnToHome Search Examples Sets whether the NPC will Return to their Home Position or not. Inventory Methods These methods are related the Settings available on the Inventory Tab of the Standard CustomNPC Editor GUI. Method Javadoc Link Examples Search getArmor Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getArmor Search Examples Returns an ItemStack object representing the Item stored in the requested Slot Number. The requested slot value can be 0:head, 1:body, 2:legs, 3:boots getLeftItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getLeftItem Search Examples Returns an ItemStack object representing the item the NPC has in their Left Hand Item Slot. getProjectileItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getProjectileItem Search Examples Returns an ItemStack object representing the item the NPC has in their Projectile Item Slot. getRightItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getRightItem Search Examples Returns an ItemStack object representing the item the NPC has in their Right Hand Item Slot. setArmor Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setArmor Search Examples Sets the item used in the Supplied Armor slot to the Supplied ItemStack Object. The Armor slot value can be 0:head, 1:body, 2:legs, 3:boots. setLeftItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setLeftItem Search Examples Sets the item the NPC is using in their left hand to the item supplied in the ItemStack Object. setProjectileItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setProjectileItem Search Examples Sets the item the NPC is using in their Projectile slot, to the item supplied in the ItemStack Object. setRightItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setRightItem Search Examples Sets the item the NPC is using in their right hand to the item supplied in the ItemStack Object. Advanced Methods These methods are related to settings that are available on the Advanced Tab of the Standard CustomNPC Editor GUI. Method Javadoc Link Examples Search getJob Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getJob Search Examples Returns a ScriptJobInterface Object containing information about the Current Job set for the NPC getRole Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getRole Search Examples Returns a ScriptRoleInterface Object containing information about the Current Role set for the NPC. setFaction Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setFaction Search Examples Returns the ID number of the faction currently set for the NPC. Data Methods These methods provide access to temporary and stored data for the NPC. Method Javadoc Link Examples Search clearStoredData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.clearStoredData Search Examples clearTempData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.clearTempData Search Examples getStoredData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getStoredData Search Examples getTempData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getTempData Search Examples hasStoredData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.hasStoredData Search Examples hasTempData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.hasTempData Search Examples removeStoredData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.removeStoredData Search Examples removeTempData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.removeTempData Search Examples setStoredData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setStoredData Search Examples setTempData Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.setTempData Search Examples Other Methods These methods are not directly related to any settings available in the Standard CustomNPC Editor GUI. Method Javadoc Link Examples Search executeCommand Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.executeCommand Search Examples Executes the Given Command. Works the same as a Command Block. On servers the enable-command-block option in the server.properties needs to be set to true getType Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.getType Search Examples Returns the EntityType of this NPC. giveItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.giveItem Search Examples Gives an ItemStack Object to a player. Player must be an instance of ScriptPlayer kill Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.kill Search Examples Kills the NPC. Does not despawn it. This is the same as if the NPC was beaten to death with a stick or other more efficient weapon. reset Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.reset Search Examples Resets the NPC in the same fashion as after it has been edited in the Standard CustomNPC Editor GUI. say Javadoc(say(message)) Javadoc(say(player, message)) http://customnpcs.wikia.com/wiki/Special:Search?search=npc.say Search Examples Depeing on the version used, will send a message to a single player, or all players on a multiplayer server. shootItem Javadoc http://customnpcs.wikia.com/wiki/Special:Search?search=npc.shootItem Search Examples Shoots an ItemStack Object at the given ScriptLivingBase Target, using the supplied accuracy value (0-100). See Also * ScriptNPC Category Page Category:ScriptNPC Category:Script Objects